<!doctype html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport"
        content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
</head>
<body style="margin: 0;">
<div id="show">

</div>
<div id="container" style="max-width: 640px; margin: 0 auto; background: rgb(83,26,43); ">
  <div style="margin-top: 20%; padding-bottom: 20%;text-align: center;">
    <a id="pickfiles1">点击上传图片</a>
  </div>
</div>
<div>
  <a id="test">点击鉴定</a>
</div>
<div id="content">

</div>

</body>

<script src="jquery.min.js"></script>
<script src="config.js"></script>
<script src="plupload.full.min.js"></script>
<script src="qiniu.min.js"></script>
<script src="qiniu_upload.js"></script>
<script>
  $(function () {
    $('#test').click(function () {
      var  urls = localStorage.getItem('urls');
      $.ajax({
        url : 'index.php?urls='+urls,
        type: 'GET',
        dataType: 'json',
        success: function (e) {
          //console.log(e);
          localStorage.removeItem('urls');
          $tmp = '<span>图片场景</span><span>'+e[0].label+'</span>';
          $tmp += '<span> 分数</span><span>'+e[0].rate+'</span>';
          $tmp += '<span> 图片是否违规</span><span>'+e[0].suggestion+'</span>';
          $tmp += '<img src="'+e[0].url+'" style="width: 20px;height:20px;display: inline-block">';
          $('#content').html($tmp);
        },
        error: function (e) {
          alert('确定图片链接可以正确访问');
        }

      });
    });

  });
</script>
</html>